/*******************************************************************************
 * Package: random1
 * Type:    RandomGenerator
 * Date:    2024-10-15 11:08
 *
 * Copyright (c) 2024 LTD All Rights Reserved.
 *
 * You may not use this file except in compliance with the License.
 *******************************************************************************/
package random1;

import java.util.random.RandomGenerator;
import java.util.random.RandomGeneratorFactory;

/**
 * 功能描述：
 * RandomGeneratorFactory 可以创建各种随机数生成器。
 * @author Songxianyang
 * @date 2024-10-15 11:08
 */
public class RandomGeneratorMain {
    public static void main(String[] args) {
        RandomGeneratorFactory.all().forEach(ss-> System.out.println(ss.name()));
        System.out.println("-------------------");
        RandomGenerator gen = RandomGeneratorFactory.of("Xoshiro256PlusPlus").create();
        System.out.println(gen.nextInt(50));// 输出 0 到 50 之间的随机数
    }
}
